#include<stdio.h>
#include<sys/types.h>
#include<unistd.h>
#include<stdlib.h>

int main()
{
  pid_t id = fork();
  if(id == 0)
  {
        
    printf("子进程%d\n",getpid());
    
    exit(0);
  }
  sleep(1);
  printf("父进程%d\n",getppid());
  return 0;
}
